package com.pjedu.springbootmybatis03.web;

import com.pjedu.springbootmybatis03.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author 汪洋
 * @Description
 */
@RestController
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("findAll")
    public Object findAll(){
        return userService.findAll();
    }

    @RequestMapping("findById")
    public Object findById(Integer uid){
        return userService.findById(uid);
    }
}
